<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>éè¯·ä¿¡æ¯</title>
  <style>
    .invite-info {
      padding: 34px;
    }

    .invite-user-info,
    .end-time {
      padding-top: 15px;
      padding-bottom: 15px;
      border-bottom: 1px solid #000;
    }

    .end-time {
      color: #479947;
    }

    .invite-info-cont {
      padding-top: 10px;
      padding-bottom: 10px;
    }

    .see-detail:after {
      content: '';
      display: block;
      clear: both;
    }

    .see-detail .see-detail-list {
      float: left;
      width: 190px;
      height: 120px;
      border: 1px solid #000;
      text-align: center;
      margin-right: 36px;
    }
  </style>
</head>

<body>
  <div class="invite-info">
    <div class="invite-user-info">邀请人昵称：
    <c:if test="${user.pet_name == null || user.pet_name==''}">无</c:if>
    <c:if test="${user.pet_name != null && user.pet_name!=''}">${user.pet_name }</c:if>
    &nbsp;&nbsp; 邀请人手机号：
    <c:if test="${user.phone == null || user.phone==''}">无</c:if>
    <c:if test="${user.phone != null && user.phone!=''}">${user.phone }</c:if></div>
    <div class="end-time">权益到期时间：<c:if test="${user.state == null || user.state =='' }">${user.end_use_time }</c:if>
    <c:if test="${user.state == '01'}">${user.end_use_time }  (已过期)</c:if>
    <c:if test="${user.state == '02'}">无权益</c:if>
    </div>
    <div class="invite-info-cont">邀请好友:<c:if test="${user.zP  == null || user.zP  ==''}">0人</c:if>
    <c:if test="${user.zP  != null && user.zP  !=''}">${user.zP }人</c:if>
    </div>
    <div class="invite-info-cont">消费人数:<c:if test="${user.xP  == null || user.xP  ==''}">0人</c:if>
    <c:if test="${user.xP  != null && user.xP  !=''}">${user.xP }人</c:if></div>
    <div class="invite-info-cont">消费商品:
    <c:if test="${user.goodsNum == null || user.goodsNum==''}">0件</c:if>
    <c:if test="${user.goodsNum != null && user.goodsNum!=''}">${user.goodsNum }件</c:if>
    </div>
    <div class="invite-info-cont">消费金额:
    <c:if test="${user.price == null || user.price==''}">0元</c:if>
    <c:if test="${user.price != null && user.price!=''}">${user.price }元</c:if>
    </div>
    <div class="see-detail">
      <div class="see-detail-list">
        <p>已消费好友</p>
        <p><c:if test="${user.xP  == null || user.xP  ==''}">0人</c:if>
    <c:if test="${user.xP  != null && user.xP  !=''}">${user.xP }人</c:if></p>
         <a href="javascript:void()" onclick="register('${pd.id}',1)">查看详情</a>
      </div>
      <div class="see-detail-list">
        <p>未消费好友</p>
        <p><c:if test="${user.zP  == null || user.zP  ==''}">0人</c:if>
    <c:if test="${user.zP  != null && user.zP  !=''}">${user.zP - user.xP}人</c:if></p>
         <a href="javascript:void()" onclick="register('${pd.id}',2)">查看详情</a>
      </div>
    </div>
  </div>
  <%@ include file="../../system/index/foot.jsp"%>
	<!-- 删除时确认窗口 -->
	<!-- <script src="static/ace/js/bootbox.js"></script> -->
	<!-- ace scripts -->
	<!-- <script src="static/ace/js/ace/ace.js"></script> -->
	<!-- 日期框 -->
<!-- 	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> -->
	<!-- 下拉框 -->
	<!-- <script src="static/ace/js/chosen.jquery.js"></script> -->
	<script src="https://cdn.bootcss.com/Chart.js/2.7.2/Chart.bundle.min.js"></script>
	<!--提示框-->
	<!-- <script type="text/javascript" src="static/js/jquery.tips.js"></script> -->
	<script type="text/javascript" src="https://chartjs.bootcss.com/samples/utils.js"></script>
</body>

<script type="text/javascript">
	$(top.hangge());
	function register(id,state){
	 var diag = new top.Dialog();
	 diag.Drag=true;
	 diag.Title ="下级列表";
	 diag.URL = '<%=basePath%>fruitUser/inviteNum.do?id='+id+'&state='+state;
	 diag.Width =900;
	 diag.Height =530;
	 diag.CancelEvent = function(){ //关闭事件
		window.location.href='<%=basePath%>fruitUser/inviteInfo?id=${pd.id}';
		diag.close();
	 };
	 diag.show();
	}
</script>

</html>
